@import "@{root-path}/base/variables.less";

#search-form {
    background: @light-grey;
    margin-top: 1em;
    padding: 2em;

    /* By default hide all elements of the search form until it is fully loaded. */
    form {
        display: none;
    }

    .form-controls {
        float: right;

        button {
            cursor: pointer;
            padding: 6px 15px;
            font-size: 1.2em;
        }
        button:before {
            padding-right: 8px;
            vertical-align: middle;
        }
        #search-button:before {
            content: url("@{image-path}/3rdparty/silk/magnifier.png");
        }
        .new-line:before {
            content: url("@{image-path}/3rdparty/silk/application_form_add.png");
        }
        .customize:before {
            content: url("@{image-path}/3rdparty/silk/wrench.png");
        }
    }

    #simple-search,
    .date-filters {
        text-align: center;
        display: flex;
        justify-content: space-between;

        > div {
            width: 24%;

            label {
                display: block;
                font-weight: bold;
            }
        }
    }

    .date-filters {
        float: left;
        margin: 0;
        padding-bottom: 0px;
        width: 49.33%;

        > div {
            width: 48.66%;
        }
    }

    .date-shortcuts {
        clear: left;
        font-style: italic;
        margin: 0 0 inherit 0;
        text-align: center;
        width: 49.33%;

        a {
            color: @dark-grey;

            &.selected {
                text-decoration: none;
            }
        }
    }

    fieldset {
        padding: 10px 0;
        width: 100%;

        .select2-container {
            margin-right: 10px;
        }
    }
    select {
        margin: 20px;
        width: 20em;
    }

    .value {
        width: 30em;
    }

    .dynamic-line-delete {
        float: left;
        display: inline-block;
        margin: 5px 10px 0 0;
        vertical-align: middle;
        background-image: url("@{image-path}/3rdparty/silk/delete.png");
        height: 16px;
        width: 16px;
        text-indent: -9999px;
    }

    #advanced-search {
        fieldset fieldset {
            border-top: 1px solid @light-grey;
        }
    }

    fieldset.options {
        h4 {
            cursor: pointer;

            span {
                color: @dark-grey;
                text-transform: uppercase;
                font-size: 0.7em;
                font-weight: bold;
            }
            .hide {
                display: none;
            }
        }

        h4 + div {
            display: none;
        }

        label {
            display: inline-block;
            min-width: 100px;
        }

        input[name=_facets],
        input[name=_sort],
        input[name=_columns_fake] {
            display: inline;
            width: 500px;
        }

        input[name=search_indices] {
            display: inline;
            width: 80%;
        }

        div.public-api-url {
            margin: 10px 0;
        }
        input[name=_public_api_url] {
            padding: 5px 8px;
            width: 100%;
        }
    }

    textarea {
        height: 300px;
        width: 600px;
    }
}

#search_results {
    table {
        caption {
            font-size: 1.7rem;
            margin: 0 0 1em 0;
        }
    }

    .external-link {
        background: transparent url("@{image-path}/icons/external.png") left top no-repeat;
        display: inline-block;
        padding-left: 17px;
    }

    .term {
        background: transparent url("@{image-path}/icons/add.png") left top no-repeat;
        display: inline-block;
        padding-left: 13px;
    }

    th.crash-id {
        width: 235px;
    }

    a.crash-id {
        font-family: monospace;
    }

    .error {
        li {
            color: @black;
            font-weight: bold;
            list-style: inside none disc;

            li {
                font-weight: normal;
                list-style: inside none circle;
                margin-left: 20px;
            }
        }
    }
}
.facet {
    .column-narrow {
        width: 10%;
    }
    .facet-term {
        width: 50%;
    }
}

.loader {
    background-image: url("@{image-path}/ajax-loader.gif");
    height: 19px;
    margin: auto;
    width: 220px;
}

/* Custom Query styles */
.custom-search {
    #editor {
        border: 1px solid lightgray;
        height: 400px;
        margin: 0;
        width: 100%;
    }
    fieldset.options input#search_indices {
        width: 100%;
    }
    .json-results {
        font-family: "Monaco", "Menlo", "Ubuntu Mono", "Consolas", "source-code-pro", monospace;
        font-size: 12px;
        height: 500px;
        width: 100%;
    }

    code {
        background-color: @off-white;
        border: 1px solid @light-grey;
        border-radius: 3px;
        margin: 0 2px;
        padding: 1px 5px;
        white-space: nowrap;
    }
}
